package com.example.firstjavamqtt.utils;

import com.example.firstjavamqtt.model.base.BaseLog;
import com.example.firstjavamqtt.model.base.Device;

import javax.servlet.http.HttpServletRequest;

public class LogRequestUtil {

    static public void setRequest(BaseLog log, HttpServletRequest request){
        if(request==null){
            return;
        }
        log.setRemoteHost(request.getRemoteHost());
        log.setMethod(request.getMethod());
        log.setUri(request.getRequestURI());
    }
}
